package main

import (
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
)

func main() {
	path := "/Users/super/Desktop/第十一组队/4群/"
	//path := "/Users/super/Desktop/test/"
	files, err := ioutil.ReadDir(path)
	if err != nil{
		panic(err)
	}

	for _, f := range files{
		oldName := string(f.Name())
		oldName = oldName[3:len(oldName) - 4]
		//fmt.Println(oldName)
		p := path + f.Name()
		fmt.Println(f.Name())
		o := filepath.Ext(p)
		//fmt.Println(o)
		var newOrder string
		fmt.Scanln(&newOrder)

		err := os.Rename(p, path+newOrder+oldName+o)
		if err != nil{
			panic(err)
		}
	}
}